﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://schemas.microsoft.com/dynamics/2011/02/documents/EntityKeyPage"
            xmlns:tns="http://schemas.microsoft.com/dynamics/2011/02/documents/EntityKeyPage"
            xmlns:ek="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey"             
            xmlns:ekl="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKeyList"
            xmlns:dp="http://schemas.microsoft.com/dynamics/2011/02/documents/DocumentPaging"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            elementFormDefault="qualified">

  <xsd:import namespace="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKeyList" schemaLocation="EntityKeyList.xsd" />
  <xsd:import namespace="http://schemas.microsoft.com/dynamics/2011/02/documents/DocumentPaging" schemaLocation="DocumentPaging.xsd" />

  <xsd:element name="EntityKeyPage" type="tns:EntityKeyPage" />

  <xsd:complexType name="EntityKeyPage">
    <xsd:sequence>
      <xsd:element minOccurs="0" ref="ekl:EntityKeyList" />
      <xsd:element minOccurs="0" ref="dp:DocumentPaging" />
      <xsd:element name="PageStatus" type="tns:EntityKeyPageStatus" />
      <xsd:element name="PageStatusDetails" type="tns:EntityKeyPageStatusDetails" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:simpleType name="EntityKeyPageStatus">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Success" />
      <xsd:enumeration value="Failure" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="EntityKeyPageStatusDetails">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="None" />
      <xsd:enumeration value="DocumentFiltersChanged" />
      <xsd:enumeration value="ChangeTrackingDisabled" />
      <xsd:enumeration value="ChangedDateTimeOutOfRange" />
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>